﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
namespace Web.Views.Simple
{
    public partial class Register : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
        protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
        {
           ///if(CreateUserWizard1.WizardSteps)
           ///
            string loginname = CreateUserWizard1.UserName;
            string company = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("company"))).Value;
            string linkman = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("linkman"))).Value;
            string txtTel = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txtTel"))).Value;
            string city= Request.Form["cid"].ToString();
            string workqq = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("workqq"))).Value;
            string workwangwang = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("workwangwang"))).Value;
            string worktime = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("worktime"))).Value;
            string address = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("address"))).Value;
            string AlipayAccount = ((HtmlInputText)(CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("txtAlipay"))).Value;

            Easydp.Models.Entities.TT_Agent obj = new Easydp.Models.Entities.TT_Agent();
            obj.LoginName = loginname;
            obj.AgentName = company;
            obj.Linkman = linkman;
            obj.Telphone = txtTel;
            obj.WorkQQ = workqq;
            obj.City = city;
            obj.WorkWangWang = workwangwang;
            obj.WorkHours = worktime;
            obj.Address = address;
            obj.AlipayAccount = AlipayAccount;
            Easydp.Controllers.AgentController controller = new Easydp.Controllers.AgentController();
            controller.Insert(obj);


            
        }
    }
}
